﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="RestaurantList.aspx.vb" Inherits="KoreanFood.RestaurantList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="RestaurantDataSource">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Detail.aspx?ID={0}" DataTextField="RestaurantName" 
                    HeaderText="Name" />
                <asp:BoundField DataField="PhoneNumber" HeaderText="PhoneNumber" 
                    SortExpression="PhoneNumber" />
                <asp:BoundField DataField="AveragePrice" HeaderText="AveragePrice" 
                    SortExpression="AveragePrice" />
                <asp:BoundField DataField="MichelinStar" HeaderText="MichelinStar" 
                    SortExpression="MichelinStar" />
                <asp:ImageField DataImageUrlField="RestaurantPicture" HeaderText="Picture">
                    <ControlStyle CssClass="restaurantPicture" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="Website" 
                    DataNavigateUrlFormatString="{0}" DataTextField="RestaurantName" 
                    HeaderText="Website" />
                <asp:HyperLinkField DataNavigateUrlFields="PostCode" 
                    DataNavigateUrlFormatString="http://maps.google.co.uk/maps?q={0}" 
                    DataTextField="PostCode" HeaderText="Address Map" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="RestaurantDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:RestaurantConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:RestaurantConnectionString.ProviderName %>" 
            
            
            SelectCommand="SELECT [RestaurantName], [PostCode], [Website], [PhoneNumber], [AveragePrice], [MichelinStar], [RestaurantPicture], [ID] FROM [Restaurants]">
        </asp:SqlDataSource>
    </p>
    </asp:Content>
